package com.lsy.on_line.zaixian.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author ShiYuan
 * @since 2022-07-24
 */
@TableName("video_order")
@ApiModel(value = "Order对象", description = "订单表")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("订单唯一标识")
    @JsonProperty("out_trade_no")
    private String outTradeNo;

    @ApiModelProperty("0表示未支付，1表示已支付")
    private Integer state;

    @ApiModelProperty("订单生成时间")
    @JsonProperty("create_time")//将驼峰形式的取别名为下划线形式
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")//日期格式取别名需要转换格式 年月日时分秒 时区为东8区
    private Date createTime;

    @ApiModelProperty("支付金额，单位分")
    @JsonProperty("total_fee")
    private Integer totalFee;

    @ApiModelProperty("视频主键")
    @JsonProperty("video_id")
    private Integer videoId;

    @ApiModelProperty("视频标题")
    @JsonProperty("video_title")
    private String videoTitle;

    @ApiModelProperty("视频图片")
    @JsonProperty("video_img")
    private String videoImg;

    @ApiModelProperty("用户id")
    @JsonProperty("user_id")
    private Integer userId;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }
    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Integer getTotalFee() {
        return totalFee;
    }

    public void setTotalFee(Integer totalFee) {
        this.totalFee = totalFee;
    }
    public Integer getVideoId() {
        return videoId;
    }

    public void setVideoId(Integer videoId) {
        this.videoId = videoId;
    }
    public String getVideoTitle() {
        return videoTitle;
    }

    public void setVideoTitle(String videoTitle) {
        this.videoTitle = videoTitle;
    }
    public String getVideoImg() {
        return videoImg;
    }

    public void setVideoImg(String videoImg) {
        this.videoImg = videoImg;
    }
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "Order{" +
            "id=" + id +
            ", outTradeNo=" + outTradeNo +
            ", state=" + state +
            ", createTime=" + createTime +
            ", totalFee=" + totalFee +
            ", videoId=" + videoId +
            ", videoTitle=" + videoTitle +
            ", videoImg=" + videoImg +
            ", userId=" + userId +
        "}";
    }
}
